package org.dizem.freepl0.compiler.errormanager;

/**
 * Created by IntelliJ IDEA.
 * User: DIZEM
 * Date: 11-2-2
 * Time: 上午11:04
 */
public class ErrorInfo {

	private int errorID;
	private String errorInfo;
	private int line;

	public ErrorInfo(int errorID, String errorInfo, int line) {
		this.errorID = errorID;
		this.errorInfo = errorInfo;
		this.line = line;
	}

	public int getErrorID() {
		return errorID;
	}

	public String getErrorInfo() {
		return errorInfo;
	}

	public int getLine() {
		return line;
	}

	@Override
	public String toString() {
		return String.format("Error(line=%d, ID=%d) %s\n", line, errorID, errorInfo);
	}
}
